﻿/*
* WKBMemoryStream
* 
* initial implementation : 29.12.2009
*
* Copyright (c) Adam Sida, asida@centrum.cz.
* All rights reserved.
* 
* for license see Petra.Gis.License.txt
*/
using System;
using System.IO;

namespace Petra.Gis.DataServices.MSSQL10.Support
{

  /// <summary>
  /// class is just simple wrapper for MemoryStream which can't expose its buffer while open
  /// WKB.GeometryFactory when read, never changes data in stream and just reads, so default stream lock is not necessary
  /// </summary>
  internal class SqlSvrMemoryStream : MemoryStream
  {

    private byte[] _buffer;

    public SqlSvrMemoryStream(byte[] buffer)
      : base(buffer)
    {
      _buffer = buffer;
    }





    public override byte[] GetBuffer()
    {
      return _buffer;
    }



  }
}
